package com.marvels.common.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.marvels.common.utils.MarvelsLogUtil;

@RestController
@RequestMapping("/common")
public class HelloWorldController {
	
    @RequestMapping("/hello")
    public String index() {
    	try{
			String[] str = new String[]{"a"};
//			String s = str[2];
			MarvelsLogUtil.getInstance().info("这是一个info级别日志");
		}catch(Exception e){
			MarvelsLogUtil.getInstance().warn("这是一个warn级别日志",e);
			MarvelsLogUtil.getInstance().error("这是一个error级别日志",e);
		}
        return "Hello World";
    }
    
}
